package com.time.thread.daemon;

/**
 * @program: tes
 * @description:
 * @author: xuejingjing
 * @create: 2021-10-21 10:18
 **/
public class DaemonThread  extends  Thread {

    private int i = 0;

    public int getI() {
        return i;
    }

    public void setI(int i) {
        this.i = i;
    }

    @Override
    public void run() {
        super.run();
        try {
            while (true) {
                i++;
                System.out.println("i=" + (i));
                Thread.sleep(1000);
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}

